function [handles] = gui_frame_manualops(handles,ui_frame)
    panel2panelV = ui_frame.panel2panelV;
    %
    boxBackGroundColor = [0.8 1 0.8];
    %
    activefuts = handles.instruments2trade;
    %
    
    panelbox = handles.manualops.panelbox;
    fields = {'instrument';'direction';'offset';'price';'volume';'ordertype';'condprice'};
    nfields = size(fields,1);
    fieldboxW = 0.8/nfields;
    field2fieldH = 0.05/(nfields+1);
    field2fieldV = 0.02;
    fieldboxH = 0.38;
    fieldLabelH = 0.25;
    fieldboxY = (1-fieldboxH-fieldLabelH)/3;
    for i = 1:nfields;
        fieldboxX_i = i*field2fieldH+(i-1)*fieldboxW;
        fieldboxY_i = fieldboxY + fieldboxH + field2fieldV;

        handles.manualops.(fields{i})  = uicontrol('Parent', panelbox, 'style', 'text', ...
             'Foregroundcolor', 'k', 'String', fields{i}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY_i fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');       
        %   
        if strcmpi(fields{i},'instrument')
            propname = [fields{i},'_popupmenu'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'popupmenu', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', activefuts, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'direction')
            propname = [fields{i},'_popupmenu'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'popupmenu', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'buy','sell'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'offset')
            propname = [fields{i},'_popupmenu'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'popupmenu', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'open','close'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'price')
            propname = [fields{i},'_edit'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'edit', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'-1'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'volume')
            propname = [fields{i},'_edit'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'edit', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'1'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'ordertype')
            propname = [fields{i},'_popupmenu'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'popupmenu', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'normal','conditional'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        elseif strcmpi(fields{i},'condprice')
            propname = [fields{i},'_edit'];
            handles.manualops.(propname)  = uicontrol('Parent', panelbox, 'style', 'edit', ...
            'Backgroundcolor', boxBackGroundColor, 'Foregroundcolor', 'b', 'String', {'-1'}, 'Units', 'Normalized', ...
                    'Position', [fieldboxX_i fieldboxY fieldboxW fieldboxH], 'FontSize', 8, ...
                    'FontWeight', 'bold');
        else
            error('internal error')
        end

    end

    buttonW = 0.15*0.9;
    buttonH = 0.4;
    buttonX = 0.86;
    buttonY = 1-buttonH;
    handles.manualops.placeorderbutton  = uicontrol('Parent', panelbox, 'style', 'pushbutton', ...
            'Backgroundcolor', 'k', 'Foregroundcolor', 'r', 'String', {'Place Order'}, 'Units', 'Normalized', ...
                    'Position', [buttonX buttonY buttonW buttonH], 'FontSize', 8, ...
                    'FontWeight', 'bold');

    %
    buttonY = 1-2*buttonH-4*panel2panelV;
    handles.manualops.cancelorderbutton  = uicontrol('Parent', panelbox, 'style', 'pushbutton', ...
            'Backgroundcolor', 'k', 'Foregroundcolor', 'r', 'String', {'Cancel Order'}, 'Units', 'Normalized', ...
                    'Position', [buttonX buttonY buttonW buttonH], 'FontSize', 8, ...
                    'FontWeight', 'bold');


    
end